#pragma once

#include "Shader.h"

namespace Graphics
{
class TranslateShader : public Shader
{
	RTTI_DECLARATIONS(TranslateShader, Graphics::Shader)
private:
	struct TranslateBufferType
	{
		float translation;
		D3DXVECTOR3 padding;
	};
public:
	TranslateShader(void);

	virtual ~TranslateShader(void);

	bool Initialize();

	void Deinitialize();

	bool Render(int indexCount, D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX projectionMatrix,  ID3D11ShaderResourceView* texture, float translation);

private:
	bool InitializeShader(HWND winHandle, const char* vertexShaderName, const char*  pixelShaderName);

	void DeinitializeShader();

	bool SetShaderParameters(D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX projectionMatrix,  ID3D11ShaderResourceView* texture, float translation);

private:
	ID3D11Buffer* mTranslateBuffer;

};
}